<script>
import ListContainer from "@/pages/Home/ListContainer/index.vue";
import ReCommend from "@/pages/Home/ReCommend/index.vue";
import Like from "@/pages/Home/Like/index.vue";
import Rank from "@/pages/Home/Rank/index.vue";
import Floor from "@/pages/Home/Floor/index.vue";
import {mapState} from "vuex";

export default {
name: "Home",
  components: {
  ListContainer,
    ReCommend,
    Rank,
    Like,
    Floor
  },
  mounted() {
    this.$store.dispatch('floorList')
  },
  computed:{
    ...mapState({
      floorList:(state)=>state.home.floorList
    })
  }
}
</script>

<template>
  <div>
    <TypeNav/>
    <ListContainer></ListContainer>
    <ReCommend></ReCommend>
    <Rank></Rank>
    <Like></Like>
    <floor v-for="(floor,index) in floorList" :id="floor.id" :floor="floor"></floor>
  </div>

</template>

<style scoped lang="less">

</style>